package com.watt.core.mvc.vo;

import lombok.Data;

@Data
public class QAAnalyzeVo implements Comparable<QAAnalyzeVo>{
    /**
     * lucene评分
     */
    private double score;
    /**
     * 答案的ID
     */
    private String key;
    /**
     * 匹配的问题
     */
    private String match;

    public QAAnalyzeVo() {
    }

    public QAAnalyzeVo(double score, String key, String match) {
        this.score = score;
        this.key = key;
        this.match = match;
    }

    @Override
    public int compareTo(QAAnalyzeVo o) {
        return (int)((o.score - this.score)*100);
    }
}
